package com.ruoyi.partybuilding.domain.vo;

import com.easy.query.core.annotation.ColumnIgnore;
import com.easy.query.core.annotation.EasyWhereCondition;
import com.easy.query.core.annotation.Navigate;
import com.easy.query.core.enums.RelationTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.partybuilding.common.EQuery.IDeptEntity;
import com.ruoyi.partybuilding.domain.Member;
import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Data
public class UserMemberVo extends Member implements IDeptEntity {


    /** 用户ID */
    //@Excel(name = "用户序号", type = Excel.Type.EXPORT, cellType = Excel.ColumnType.NUMERIC, prompt = "用户编号")
    private Long userId;

    /** 部门ID */
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
   // @Excel(name = "部门编号", type = Excel.Type.IMPORT)
    private Long deptId;

    //@Excel(name = "组织名称",sort = 1,type = Excel.Type.IMPORT)
    @ApiModelProperty("部门名称")
    String deptName;
    /** 部门祖级列表 */
    @ApiModelProperty("部门祖级列表")
    private String ancestors;
    /** 用户账号 */
    @Excel(name = "登录账号",sort = 3)
    private String userName;

    @Getter(AccessLevel.NONE)
    @Setter(AccessLevel.NONE)
    String name;
    public String getName(){
        return  getNickName();
    }
    public void  setName(String name){
        setNickName(name);
    }

    /** 用户昵称 */
    @EasyWhereCondition( )
    @Excel(name = "姓名",sort = 2)
    private String nickName;

    /** 用户邮箱 */
    private String email;


    /** 手机号码 */
    @EasyWhereCondition
    @Excel(name = "手机号",sort = 3, cellType = Excel.ColumnType.TEXT)
    private String phonenumber;

    /** 用户性别 */
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "性别", sort = 4,readConverterExp = "0=男,1=女,2=未知")
    private String sex;

    /** 用户头像 */
    private String avatar;

    /** 密码 */
    private String password;

    /** 帐号状态（0正常 1停用） */
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 最后登录IP */
    private String loginIp;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loginDate;
    /**
     * 创建者
     */
    @ApiModelProperty("创建人名称")
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime=new Date();

    /** 更新者 */
    private String updateBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

}
